package com.angel.kuaidi.json.handler;

import com.angel.kuaidi.entity.UpdateInfo;
import com.angel.kuaidi.json.CXJsonNode;

public class UpdateHandler implements BaseHandler {

	@Override
	public Object parseJson(CXJsonNode root) {

		UpdateInfo u = null;
		try {
			u = new UpdateInfo();
			u.clientname = root.getValue("clientname");
			u.version = root.getValue("version");
			u.newversion = root.getValue("newversion");
			u.descrition = root.getValue("descrition");
			u.updateflag = root.getNumber("updateflag");
			u.updateurl = root.getValue("updateurl");
			return u;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
